﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
using System.Web;
using System.Web.Caching;

namespace WcfRestService1
{
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    public class Service1
    {
        [WebGet(UriTemplate = "Get"), OperationContract]
        public List<SampleItem> GetCollection()
        {
            return new List<SampleItem>() { new SampleItem() { Id = 1, StringValue = "Hello" } };
        }

        [WebInvoke(UriTemplate = "POST", Method = "POST"), OperationContract]
        public SampleItem Create(SampleItem instance)
        {
            return null;
        }

        [WebGet(UriTemplate = "{id}"), OperationContract]
        public SampleItem Get(string id)
        {
            return null;
        }

        [WebInvoke(UriTemplate = "{id}", Method = "PUT"), OperationContract]
        public SampleItem Update(string id, SampleItem instance)
        {
            return null;
        }

        [WebInvoke(UriTemplate = "{id}", Method = "DELETE"), OperationContract]
        public void Delete(string id)
        {
            
        }

    }
}
